3.12 \(\int \sin ^4(c+d x) (a+b \tan (c+d x)) \, dx\)

Optimal. Leaf size=83 \[ -\frac {\sin ^3(c+d x) \cos (c+d x) (a+b \tan (c+d x))}{4 d}-\frac {\sin (c+d x) \cos (c+d x) (3 a+4 b \tan (c+d x))}{8 d}+\frac {3 a x}{8}-\frac {b \log (\cos (c+d x))}{d} \]

[Out]

3/8*a*x-b*ln(cos(d*x+c))/d-1/4*cos(d*x+c)*sin(d*x+c)^3*(a+b*tan(d*x+c))/d-1/8*cos(d*x+c)*sin(d*x+c)*(3*a+4*b*t
an(d*x+c))/d

________________________________________________________________________________________

Rubi [A]  time = 0.17, antiderivative size = 83, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.210, Rules used = {819, 635, 203, 260} \[ -\frac {\sin ^3(c+d x) \cos (c+d x) (a+b \tan (c+d x))}{4 d}-\frac {\sin (c+d x) \cos (c+d x) (3 a+4 b \tan (c+d x))}{8 d}+\frac {3 a x}{8}-\frac {b \log (\cos (c+d x))}{d} \]

Antiderivative was successfully verified.

[In]

Int[Sin[c + d*x]^4*(a + b*Tan[c + d*x]),x]

[Out]

(3*a*x)/8 - (b*Log[Cos[c + d*x]])/d - (Cos[c + d*x]*Sin[c + d*x]^3*(a + b*Tan[c + d*x]))/(4*d) - (Cos[c + d*x]
*Sin[c + d*x]*(3*a + 4*b*Tan[c + d*x]))/(8*d)

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 635

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Dist[d, Int[1/(a + c*x^2), x], x] + Dist[e, Int[x/
(a + c*x^2), x], x] /; FreeQ[{a, c, d, e}, x] &&  !NiceSqrtQ[-(a*c)]

Rule 819

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[((d + e*x)^(
m - 1)*(a + c*x^2)^(p + 1)*(a*(e*f + d*g) - (c*d*f - a*e*g)*x))/(2*a*c*(p + 1)), x] - Dist[1/(2*a*c*(p + 1)),
Int[(d + e*x)^(m - 2)*(a + c*x^2)^(p + 1)*Simp[a*e*(e*f*(m - 1) + d*g*m) - c*d^2*f*(2*p + 3) + e*(a*e*g*m - c*
d*f*(m + 2*p + 2))*x, x], x], x] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[c*d^2 + a*e^2, 0] && LtQ[p, -1] && GtQ
[m, 1] && (EqQ[d, 0] || (EqQ[m, 2] && EqQ[p, -3] && RationalQ[a, c, d, e, f, g]) ||  !ILtQ[m + 2*p + 3, 0])

Rubi steps

\begin {align*} \int \sin ^4(c+d x) (a+b \tan (c+d x)) \, dx &=\frac {\operatorname {Subst}\left (\int \frac {x^4 (a+b x)}{\left (1+x^2\right )^3} \, dx,x,\tan (c+d x)\right )}{d}\\ &=-\frac {\cos (c+d x) \sin ^3(c+d x) (a+b \tan (c+d x))}{4 d}+\frac {\operatorname {Subst}\left (\int \frac {x^2 (3 a+4 b x)}{\left (1+x^2\right )^2} \, dx,x,\tan (c+d x)\right )}{4 d}\\ &=-\frac {\cos (c+d x) \sin ^3(c+d x) (a+b \tan (c+d x))}{4 d}-\frac {\cos (c+d x) \sin (c+d x) (3 a+4 b \tan (c+d x))}{8 d}+\frac {\operatorname {Subst}\left (\int \frac {3 a+8 b x}{1+x^2} \, dx,x,\tan (c+d x)\right )}{8 d}\\ &=-\frac {\cos (c+d x) \sin ^3(c+d x) (a+b \tan (c+d x))}{4 d}-\frac {\cos (c+d x) \sin (c+d x) (3 a+4 b \tan (c+d x))}{8 d}+\frac {(3 a) \operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (c+d x)\right )}{8 d}+\frac {b \operatorname {Subst}\left (\int \frac {x}{1+x^2} \, dx,x,\tan (c+d x)\right )}{d}\\ &=\frac {3 a x}{8}-\frac {b \log (\cos (c+d x))}{d}-\frac {\cos (c+d x) \sin ^3(c+d x) (a+b \tan (c+d x))}{4 d}-\frac {\cos (c+d x) \sin (c+d x) (3 a+4 b \tan (c+d x))}{8 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.08, size = 82, normalized size = 0.99 \[ \frac {3 a (c+d x)}{8 d}-\frac {a \sin (2 (c+d x))}{4 d}+\frac {a \sin (4 (c+d x))}{32 d}-\frac {b \left (\frac {1}{4} \cos ^4(c+d x)-\cos ^2(c+d x)+\log (\cos (c+d x))\right )}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[Sin[c + d*x]^4*(a + b*Tan[c + d*x]),x]

[Out]

(3*a*(c + d*x))/(8*d) - (b*(-Cos[c + d*x]^2 + Cos[c + d*x]^4/4 + Log[Cos[c + d*x]]))/d - (a*Sin[2*(c + d*x)])/
(4*d) + (a*Sin[4*(c + d*x)])/(32*d)

________________________________________________________________________________________

fricas [A]  time = 0.46, size = 74, normalized size = 0.89 \[ -\frac {2 \, b \cos \left (d x + c\right )^{4} - 3 \, a d x - 8 \, b \cos \left (d x + c\right )^{2} + 8 \, b \log \left (-\cos \left (d x + c\right )\right ) - {\left (2 \, a \cos \left (d x + c\right )^{3} - 5 \, a \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{8 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(d*x+c)^4*(a+b*tan(d*x+c)),x, algorithm="fricas")

[Out]

-1/8*(2*b*cos(d*x + c)^4 - 3*a*d*x - 8*b*cos(d*x + c)^2 + 8*b*log(-cos(d*x + c)) - (2*a*cos(d*x + c)^3 - 5*a*c
os(d*x + c))*sin(d*x + c))/d

________________________________________________________________________________________

giac [B]  time = 0.88, size = 1066, normalized size = 12.84 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(d*x+c)^4*(a+b*tan(d*x+c)),x, algorithm="giac")

[Out]

1/32*(12*a*d*x*tan(d*x)^4*tan(c)^4 - 16*b*log(4*(tan(d*x)^4*tan(c)^2 - 2*tan(d*x)^3*tan(c) + tan(d*x)^2*tan(c)
^2 + tan(d*x)^2 - 2*tan(d*x)*tan(c) + 1)/(tan(c)^2 + 1))*tan(d*x)^4*tan(c)^4 + 24*a*d*x*tan(d*x)^4*tan(c)^2 +
24*a*d*x*tan(d*x)^2*tan(c)^4 + 11*b*tan(d*x)^4*tan(c)^4 - 32*b*log(4*(tan(d*x)^4*tan(c)^2 - 2*tan(d*x)^3*tan(c
) + tan(d*x)^2*tan(c)^2 + tan(d*x)^2 - 2*tan(d*x)*tan(c) + 1)/(tan(c)^2 + 1))*tan(d*x)^4*tan(c)^2 + 12*a*tan(d
*x)^4*tan(c)^3 - 32*b*log(4*(tan(d*x)^4*tan(c)^2 - 2*tan(d*x)^3*tan(c) + tan(d*x)^2*tan(c)^2 + tan(d*x)^2 - 2*
tan(d*x)*tan(c) + 1)/(tan(c)^2 + 1))*tan(d*x)^2*tan(c)^4 + 12*a*tan(d*x)^3*tan(c)^4 + 12*a*d*x*tan(d*x)^4 + 48
*a*d*x*tan(d*x)^2*tan(c)^2 + 6*b*tan(d*x)^4*tan(c)^2 - 32*b*tan(d*x)^3*tan(c)^3 + 12*a*d*x*tan(c)^4 + 6*b*tan(
d*x)^2*tan(c)^4 - 16*b*log(4*(tan(d*x)^4*tan(c)^2 - 2*tan(d*x)^3*tan(c) + tan(d*x)^2*tan(c)^2 + tan(d*x)^2 - 2
*tan(d*x)*tan(c) + 1)/(tan(c)^2 + 1))*tan(d*x)^4 + 20*a*tan(d*x)^4*tan(c) - 64*b*log(4*(tan(d*x)^4*tan(c)^2 -
2*tan(d*x)^3*tan(c) + tan(d*x)^2*tan(c)^2 + tan(d*x)^2 - 2*tan(d*x)*tan(c) + 1)/(tan(c)^2 + 1))*tan(d*x)^2*tan
(c)^2 + 24*a*tan(d*x)^3*tan(c)^2 + 24*a*tan(d*x)^2*tan(c)^3 - 16*b*log(4*(tan(d*x)^4*tan(c)^2 - 2*tan(d*x)^3*t
an(c) + tan(d*x)^2*tan(c)^2 + tan(d*x)^2 - 2*tan(d*x)*tan(c) + 1)/(tan(c)^2 + 1))*tan(c)^4 + 20*a*tan(d*x)*tan
(c)^4 + 24*a*d*x*tan(d*x)^2 - 13*b*tan(d*x)^4 - 64*b*tan(d*x)^3*tan(c) + 24*a*d*x*tan(c)^2 - 36*b*tan(d*x)^2*t
an(c)^2 - 64*b*tan(d*x)*tan(c)^3 - 13*b*tan(c)^4 - 32*b*log(4*(tan(d*x)^4*tan(c)^2 - 2*tan(d*x)^3*tan(c) + tan
(d*x)^2*tan(c)^2 + tan(d*x)^2 - 2*tan(d*x)*tan(c) + 1)/(tan(c)^2 + 1))*tan(d*x)^2 - 20*a*tan(d*x)^3 - 24*a*tan
(d*x)^2*tan(c) - 32*b*log(4*(tan(d*x)^4*tan(c)^2 - 2*tan(d*x)^3*tan(c) + tan(d*x)^2*tan(c)^2 + tan(d*x)^2 - 2*
tan(d*x)*tan(c) + 1)/(tan(c)^2 + 1))*tan(c)^2 - 24*a*tan(d*x)*tan(c)^2 - 20*a*tan(c)^3 + 12*a*d*x + 6*b*tan(d*
x)^2 - 32*b*tan(d*x)*tan(c) + 6*b*tan(c)^2 - 16*b*log(4*(tan(d*x)^4*tan(c)^2 - 2*tan(d*x)^3*tan(c) + tan(d*x)^
2*tan(c)^2 + tan(d*x)^2 - 2*tan(d*x)*tan(c) + 1)/(tan(c)^2 + 1)) - 12*a*tan(d*x) - 12*a*tan(c) + 11*b)/(d*tan(
d*x)^4*tan(c)^4 + 2*d*tan(d*x)^4*tan(c)^2 + 2*d*tan(d*x)^2*tan(c)^4 + d*tan(d*x)^4 + 4*d*tan(d*x)^2*tan(c)^2 +
 d*tan(c)^4 + 2*d*tan(d*x)^2 + 2*d*tan(c)^2 + d)

________________________________________________________________________________________

maple [A]  time = 0.31, size = 92, normalized size = 1.11 \[ -\frac {a \cos \left (d x +c \right ) \left (\sin ^{3}\left (d x +c \right )\right )}{4 d}-\frac {3 a \cos \left (d x +c \right ) \sin \left (d x +c \right )}{8 d}+\frac {3 a x}{8}+\frac {3 c a}{8 d}-\frac {b \left (\sin ^{4}\left (d x +c \right )\right )}{4 d}-\frac {b \left (\sin ^{2}\left (d x +c \right )\right )}{2 d}-\frac {b \ln \left (\cos \left (d x +c \right )\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(d*x+c)^4*(a+b*tan(d*x+c)),x)

[Out]

-1/4/d*a*cos(d*x+c)*sin(d*x+c)^3-3/8*a*cos(d*x+c)*sin(d*x+c)/d+3/8*a*x+3/8/d*c*a-1/4/d*b*sin(d*x+c)^4-1/2/d*b*
sin(d*x+c)^2-b*ln(cos(d*x+c))/d

________________________________________________________________________________________

maxima [A]  time = 0.53, size = 87, normalized size = 1.05 \[ \frac {3 \, {\left (d x + c\right )} a + 4 \, b \log \left (\tan \left (d x + c\right )^{2} + 1\right ) - \frac {5 \, a \tan \left (d x + c\right )^{3} - 8 \, b \tan \left (d x + c\right )^{2} + 3 \, a \tan \left (d x + c\right ) - 6 \, b}{\tan \left (d x + c\right )^{4} + 2 \, \tan \left (d x + c\right )^{2} + 1}}{8 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(d*x+c)^4*(a+b*tan(d*x+c)),x, algorithm="maxima")

[Out]

1/8*(3*(d*x + c)*a + 4*b*log(tan(d*x + c)^2 + 1) - (5*a*tan(d*x + c)^3 - 8*b*tan(d*x + c)^2 + 3*a*tan(d*x + c)
 - 6*b)/(tan(d*x + c)^4 + 2*tan(d*x + c)^2 + 1))/d

________________________________________________________________________________________

mupad [B]  time = 3.79, size = 155, normalized size = 1.87 \[ \frac {3\,a\,x}{8}+\frac {b\,\ln \left ({\mathrm {tan}\left (c+d\,x\right )}^2+1\right )}{2\,d}+\frac {3\,b}{4\,d\,\left ({\mathrm {tan}\left (c+d\,x\right )}^4+2\,{\mathrm {tan}\left (c+d\,x\right )}^2+1\right )}-\frac {5\,a\,{\mathrm {tan}\left (c+d\,x\right )}^3}{8\,d\,\left ({\mathrm {tan}\left (c+d\,x\right )}^4+2\,{\mathrm {tan}\left (c+d\,x\right )}^2+1\right )}+\frac {b\,{\mathrm {tan}\left (c+d\,x\right )}^2}{d\,\left ({\mathrm {tan}\left (c+d\,x\right )}^4+2\,{\mathrm {tan}\left (c+d\,x\right )}^2+1\right )}-\frac {3\,a\,\mathrm {tan}\left (c+d\,x\right )}{8\,d\,\left ({\mathrm {tan}\left (c+d\,x\right )}^4+2\,{\mathrm {tan}\left (c+d\,x\right )}^2+1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(c + d*x)^4*(a + b*tan(c + d*x)),x)

[Out]

(3*a*x)/8 + (b*log(tan(c + d*x)^2 + 1))/(2*d) + (3*b)/(4*d*(2*tan(c + d*x)^2 + tan(c + d*x)^4 + 1)) - (5*a*tan
(c + d*x)^3)/(8*d*(2*tan(c + d*x)^2 + tan(c + d*x)^4 + 1)) + (b*tan(c + d*x)^2)/(d*(2*tan(c + d*x)^2 + tan(c +
 d*x)^4 + 1)) - (3*a*tan(c + d*x))/(8*d*(2*tan(c + d*x)^2 + tan(c + d*x)^4 + 1))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \tan {\left (c + d x \right )}\right ) \sin ^{4}{\left (c + d x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(d*x+c)**4*(a+b*tan(d*x+c)),x)

[Out]

Integral((a + b*tan(c + d*x))*sin(c + d*x)**4, x)

________________________________________________________________________________________